# Document Library Configuration
Defines a document library template including columns, content types, views, folders, versioning, compliance, and alerts.
Referenced by: SiteCfg.DocumentLibrarySets, DocLib Set file handler.
# Overview
DocLibCfg defines properties for creating a document library: which columns and content types it contains, which views are available, versioning strategy, and alerts. It can also define folder structures and document sets.
Child configurations:
ViewCfg (list)— views with columns, filters, grouping (referenced viaViewSets)FolderCfg (list)— folder structures (referenced viaFolderSets)DocumentSetCfg (list)— document set templates (referenced viaDocumentSets)PermissionSetCfg— permissions (referenced viaPermissionSet)PlannerCfg— Planner board (referenced viaPlannerSet)AlertCfg (list)— alerts for notificationsDoclibManagedNavigationCfg— managed navigation settings
# Applied when
The document library is created when:
- The parent
SiteCfgis provisioned and references this configuration viaDocumentLibrarySets - OR the DocLib Set file handler references this configuration
- Applied during site provisioning after the site is created; library-level properties (title, description, versioning, views, columns, content types, alerts, permissions) are applied immediately after library creation
- All child configurations (views, folders, document sets, permissions, Planner boards) are applied hierarchically during library provisioning
# Core settings
# Name
Type: string | Required: Yes
Unique name for this library configuration. Referenced from SiteCfg.DocumentLibrarySets and used to create the actual SharePoint library.
Example: "Matters", "Contracts"
# Code
Type: string | Required: Yes
Code used in the library URL (the URL path segment). Must be unique within the site. No spaces or special characters.
Example: "matters", "contracts"
# Title
Type: string | Required: No
Display name of the library shown in the SharePoint UI. Falls back to Code if empty.
Example: "Matters and Cases", "Client Contracts"
# Description
Type: string | Required: No
Description of the library shown in SharePoint site contents and library settings.
# Content and structure
# Columns
Type: string (list) | Required: No
Names of ColumnCfg entries to add to this library. Columns are added after library creation.
Example: ["MatterCode", "ClientName", "MatterType"]
# ContentTypes
Type: string (list) | Required: No
Names of ContentTypeCfg entries to activate. Content types define which fields and templates are available to users.
Default: ["DMS Document", "DMS E-mail"]
Example: ["Matter", "Contract", "Correspondence"]
# ViewSets
Type: string (list) | Required: No
Names of ViewCfg entries to create. Views display filtered/grouped/sorted lists of library items.
Example: ["Active Matters", "By Client", "By Status"]
# FolderSets
Type: string (list) | Required: No
Names of FolderCfg entries to create folder structures. Use for complex hierarchies. For simple flat folders, use Folders.
Example: ["MattersFolder", "ContractsFolder"]
# DocumentSets
Type: string (list) | Required: No
Names of DocumentSetCfg entries to enable. Document sets are special folder templates containing predefined documents.
Example: ["MatterDocSet", "DealDocSet"]
# Folders
Type: string (list) | Required: No
Simple folder names to create at the library root. Use for flat folder structures. For complex hierarchies, use FolderSets instead.
Example: ["2024", "2025", "Archive"]
# Indexes
Type: string (list) | Required: No
Field names to create search indexes on. Indexing improves query performance for large libraries.
Example: ["MatterCode", "ClientName", "Status"]
# Behavioral settings
# NoCrawl
Type: bool | Required: No | Default: false
Exclude library from search index. When enabled, documents in this library are not searchable via SharePoint search. Useful for temporary or archived libraries.
# ExcludeFromOfflineClient
Type: bool | Required: No
Exclude from Outlook offline sync. When enabled, users cannot sync this library to Outlook offline.
# EnableFolderCreation
Type: bool | Required: No
Allow folder creation. When enabled, users can create new folders within the library. When disabled, folder structure is fixed.
# QuickLaunchAddToRoot
Type: bool | Required: No | Default: true
Add library link to Quick Launch navigation at root level. When enabled, the library appears in the site's Quick Launch menu.
# QuickLaunchAddToRecent
Type: bool? | Default: true | Required: No
Show recent items from this library in the Quick Launch menu.
# AlwaysCreateFolders
Type: bool | Required: No
Recreate folders when the library is updated. When enabled, folders specified in Folders or FolderSets are recreated during updates, even if manually deleted.
# CoPilot Agent
# CoPilotAgents
Type: string (list) | Default: — | Required: No
Names of CoPilotAgentDefinitionCfg entries to deploy as .agent files to the library root. Agent files are deployed when the library is first created.
Example: ["MatterAgent"]
See CoPilot Agent Configuration for full property reference.
# AlwaysDeployAgentFiles
Type: bool | Default: false | Required: No
Re-deploy agent files on every provisioning run, not only on first creation. When enabled, agent files are updated even if the library already exists.
# Versioning
# EnableVersions
Type: bool? | Default: true | Required: No
Enable version history. When enabled, SharePoint keeps previous versions of documents. When disabled, only the current version is kept.
# EnableMinorVersions
Type: bool? | Default: true | Required: No
Enable draft versions (minor versions). When enabled, users can save drafts before publishing major versions. When disabled, all versions are considered published.
Note: Only applies when EnableVersions is true.
# MajorVersionLimit
Type: int | Required: No
Number of major versions to keep. Older major versions are automatically deleted when this limit is exceeded. Leave empty for unlimited.
Example: 10 — Keep only the 10 most recent published versions.
# MajorWithMinorVersionsLimit
Type: int | Required: No
Number of draft versions per major version to keep. When exceeded, older drafts are deleted.
Example: 5 — Keep up to 5 drafts per published version.
Note: Only applies when EnableMinorVersions is true.
# DraftVersionVisibility
Type: enum | Required: No
Controls who can see draft versions. Valid values:
Reader— Only readers of the item can see draftsApprover— Only item approvers can see draftsRestricted— Only the author can see drafts
# ForceCheckout
Type: bool? | Default: false | Required: No
Require users to check out documents before editing. When enabled, users must check out a document, edit it, then check it back in (creating a new version). Prevents simultaneous edits.
# OneNote integration
# OneNoteCreateFile
Type: bool | Required: No | Configurator: "Create File"
Create a OneNote notebook in the library. When enabled, a new OneNote file is created during library provisioning according to OneNoteFileNameFormat.
# OneNoteFileNameFormat
Type: string | Required: No | Default: {MatterName} ({MatterCode}) | Configurator: "Filename Format"
OneNote notebook name pattern. Supports template variables:
{MatterCode}— Matter or project code{MatterName}— Matter or project name
Example: "{MatterCode} - {MatterName} Notes" produces "M-2024-001 - Smith v. Jones Notes".
Note: Only applied when OneNoteCreateFile is true.
# OneNoteFilePermissionSet
Type: string | Required: No | Configurator: "PermissionSet"
Name of PermissionSetCfg to apply to the OneNote notebook. Allows different permissions on the notebook than the library itself.
Example: "MatterOwners"
# Compliance and retention
# ComplianceLabel
Type: string | Required: No | Configurator: "Label"
Retention/compliance label to apply to the library. Label must exist in your Microsoft Purview retention policies.
Example: "Legal Hold", "Client Confidential"
# ComplianceLabelBlockEdit
Type: bool | Required: No | Configurator: "Block Edit"
Block editing of labeled items. When enabled, documents with the compliance label cannot be edited.
# ComplianceLabelBlockDelete
Type: bool | Required: No | Configurator: "Block Delete"
Block deletion of labeled items. When enabled, documents with the compliance label cannot be deleted.
# DefaultSensitivityLabelName
Type: string | Required: No
Default sensitivity label for new documents uploaded to this library. Sensitivity labels control access and sharing permissions.
Example: "Internal Use Only", "Confidential", "Public"
# Security and access
# PermissionSet
Type: string | Required: No
Name of PermissionSetCfg to apply to this library. Defines who can access, edit, or delete documents.
Example: "Matters", "Clients"
# PlannerSet
Type: string | Required: No
Name of PlannerCfg for task management. Integrates a Microsoft Planner board with this library for task tracking.
Example: "DocumentApprovalTasks"
# Alerts
Type: AlertCfg (list) | Required: No
Alert definitions for email notifications. Users can subscribe to alerts when items are added, modified, or deleted.
# ContentTypesEnabled
Type: bool | Required: No | Configurator: "Allow management of content types"
Allow content type management. When enabled, users and administrators can manage content types in this library. When disabled, only your configured content types are used.
# EnableEnterpriseKeywords
Type: bool | Required: No
Enable enterprise keywords (managed metadata). When enabled, users can tag documents with keywords from your managed metadata service.
# ImportDefaultDocumentsFromUrl
Type: string | Required: No | Configurator: "ImportDefaultDocumentsFromUrl (relative)"
URL to import default documents from (relative path within the site). Used to populate the library with template documents during provisioning.
Example: "SharedDocuments/Templates" — Copies documents from the SharedDocuments/Templates folder into this library.
# Views and navigation
# ViewCfgs
Type: ViewCfg (list) | Required: No
View configurations. Alternative to ViewSets — allows inline view definitions. See View Configuration for details.
# ManagedNavigation
Type: DoclibManagedNavigationCfg | Required: No
Managed navigation configuration with hierarchy and filter fields. Enables navigation breadcrumbs and filter panel in modern list experience.
# ManagedNavigation.Enabled
Type: bool | Required: No
Enable managed navigation for this library. When enabled, users see navigation breadcrumbs and filter panel in modern list experience.
# ManagedNavigation.HierachyFields
Type: string (list) | Required: No
Field names (title or internal name) to show in the navigation hierarchy. Creates a breadcrumb trail based on field values.
Example: ["DocType", "Status"] — Shows documents grouped by DocType, then Status.
Note: Typo in property name (HierachyFields → should be HierarchyFields); use exact spelling as shown.
# ManagedNavigation.FilterFields
Type: string (list) | Required: No
Field names (title or internal name) to show in the filter panel. Users can filter library items by these fields.
Example: ["Status", "Owner", "Priority"] — Adds filter controls for Status, Owner, and Priority.
# Modern list experience
# ListExperience
Type: enum | Required: No | Applies When: SharePoint 2019+, SharePoint Online, or modern on-premises (not supported on SharePoint 2013/2016)
List experience preference. Valid values:
Auto— Use SharePoint default (typically modern for SharePoint Online)ClassicExperience— Force classic (traditional) list viewModernListExperience— Force modern responsive list view
Note: This setting is ignored on SharePoint 2013 and 2016.
# Related
- View Configuration — library views
- Column Configuration — library columns
- Content Type Configuration — content types
- Folder Configuration — folder structures
- Permission Set Configuration — library permissions
- Alert Configuration — email alerts
- Site Configuration — parent site
- Doclib Set file handler — provision libraries from Excel
- CoPilot Agent Configuration — deploy AI agents to library root